package com;

public class Teacher {
    String name;
    int age;
    char sex;
    String kec;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public String getKec() {
        return kec;
    }

    public void setKec(String kec) {
        this.kec = kec;
    }
    public void xinxi(){
        System.out.println("教授"+kec+"的"+age+sex+"教师他的姓名是"+name );
    }

    public Teacher() {
    }

    public Teacher(String name, int age, char sex, String kec) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.kec = kec;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                ", kec='" + kec + '\'' +
                '}';
    }
}
